from fastapi import APIRouter, Depends
from core.base.api_mode import ApiResponse, api_success
from modules.system.services.server_service import ServerService
from modules.system.vos.server_vo import ServerMonitorModel
from core.token_manager import get_current_user


router = APIRouter(dependencies=[Depends(get_current_user)])


@router.get("/monitor", response_model=ApiResponse[ServerMonitorModel], summary="服务器监控信息")
async def server_monitor():
    data = await ServerService.monitor()
    return api_success(data, msg="获取成功")